<script>

// assigning DisplayGreeting() to the variable "display"
var display = function DisplayGreeting(hour)
{
  if (hour >= 22 || hour <= 5)
    document.write("Goodnight, world!");
  else
   document.write("Hello, world!");
}

// call DisplayGreeting() via the variable "display"
display(10);

</script>
